Hardening merge - #96
Open
michaelvic123 wants to merge 2 commits into
Open
Conversation
added 2 commits
July 30, 2026 00:25
… zero-address guard, overflow events - STABILITY.md documents 24 ContractError discriminants, storage keys, and event topics as immutable after deployment - validation.rs adds validate_hex_hash returning Result for ergonomic ?-based error propagation in write functions - lib.rs: DataKey::Initialized flag (explicit initialization tracking), zero-address rejection in initialize (InvalidAdminAddress = 25), hash validation and overflow events in record_token/record_vote - Build blocked by Windows AppLocker policy (os error 4551) on stellar-xdr build script; code compiles past parsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
STABILITY.md — 24 error discriminants, 16 storage keys, 18 event topics documented as immutable
validation.rs — validate_hex_hash returning Result for ?-based error propagation
lib.rs DataKey::Initialized — explicit init flag instead of implicit Admin presence
lib.rs zero-address guard — initialize rejects null address with InvalidAdminAddress = 25
lib.rs hash validation — record_token/record_vote validate ballot_id_hash via validate_hex_hash
lib.rs overflow events — record_token/record_vote emit ("counter", "ovrflw") on u32::MAX
All existing upstream features (multi-sig, Merkle proofs, pause/unpause, upgrades, limits, batch, expiration) are preserved. The only non-additive change is removing .github/workflows/ci.yml (it exists on AnonVote/contracts:main so the merge is a no-op for that file).
Visit the link above to create the PR.
closes #90